<template>
	<div>
		<h1>{{title}}</h1>
        <ul>
            <li v-for="(item, index) in list" :key="index">{{item.title}}</li>
        </ul>
	</div>
</template>
<script>
import axios from 'axios'
export default {
    async asyncData() {
        const { data } = await axios({
            method: 'GET',
            url: 'http://localhost:3000/index.json'
        })
        // 这里返回的数据会和 data 中的数据合并
        return data
    }
};
</script>
<style lang="scss" scoped>
</style>